#ifndef FILE_PNG_H
#define FILE_PNG_H

#include "libdef.h"

typedef struct tagChunk
{
	BYTE *length;
	BYTE *name;
	BYTE *data;
	BYTE *crc;
} Chunk;

typedef struct tagChunkList
{
	Chunk *item;
	struct tagChunkList *next;
} ChunkList;

typedef struct tagPNG
{
	size_t count;
	ChunkList *head;
} PNG;

PNG *LoadPNG(const char *path);
void ReleasePNG(PNG* png);

#endif